﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace ReflectionDemo
{
    public interface IA
    {
        string Field1 { get; set; }
        void Test();
    }

    public class AClass :IA
    {
        public string Field1 { get; set; }
        [Display(Name = "这是Fieldx")]
        public string Fieldx { get; set; }
        public virtual void Test()
        {
            Console.WriteLine("This is a test in AClass");
        }
    }

    public class BClass : AClass
    {
        public string Field2 { get; set; }

        public override void Test()
        {
            Console.WriteLine("This is a test in BClass");
        }
    }

    public class CClass : BClass
    {
        public string Field3 { get; set; }
        public override void Test()
        {
            Console.WriteLine("This is a test in CClass");
        }
    }

    public class GenericAClass<T> : AClass
    {
        public override void Test()
        {
            Console.WriteLine("This is a test in GenericAClass");
        }

    }
}
